Utertiguk


Anguniagaq 8: Suliffiit naapertuuttut aningaasarsiornikkullu siuariartorneq

BNP innuttaasumut ataatsimut


FN 8.1.1 Ukiumut innuttaasumut ataatsimut BNP-p ineriartornera
# Import
NRX10_raw <- 
  statgl_url("NRX10", lang = language) %>% 
  statgl_fetch(
    units     = "K",
    account   = "02",
    Aar       = px_all(),
    .col_code = TRUE
               ) %>% 
  as_tibble()

# transform 
NRX10 <- 
  NRX10_raw %>% 
  rename("time" = "Aar") %>% 
  mutate(time = time %>% as.numeric()) %>% 
  mutate(value = (value - lag(value)) / lag(value))


NRX10 %>% 
  ggplot(aes(
    x = time,
    y = value,
    fill = account
  )) +
  geom_col() +
  scale_fill_statgl() + 
  theme_statgl() +
  theme(legend.position = "none") +
  scale_y_continuous(labels = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig1$title[language],
    subtitle = NRX10[[1]][1],
    x        = " ",
    y        = sdg8$fig$fig1$y_lab[language],
    fill     = " ",
    caption  = sdg8$fig$fig1$cap[language]
  )

Kisitsisaataasivik, BNP

Kisitsisaataasivik, suliffillit


tab <- 
  NRX10 %>% 
  mutate(value = value*100) %>% 
  filter(time >= max(time) - 5) %>% 
  arrange(desc(time)) %>% 
  select(-account) %>% 
  mutate(time = time %>% as.character())


if(language != "en"){
  
  table <- 
    tab %>% 
    select(-units) %>% 
    mutate(value = value %>% round(1)) %>% 
    rename(" " = 1, "Realvækst" = value) %>% 
    statgl_table() %>% 
    pack_rows(index = tab[[1]] %>% table()) %>% 
    add_footnote(sdg8$fig$fig1$foot1[language], notation = "symbol")
  
} else {
  
   table <- 
    tab %>% 
    select(-units) %>% 
    mutate(value = value %>% round(1)) %>% 
    rename(" " = 1, "Real growth rate" = value) %>% 
    statgl_table() %>% 
    pack_rows(index = tab[[1]] %>% table()) %>% 
    add_footnote(sdg8$fig$fig1$foot1[language], notation = "symbol")

}


table
Realvækst
Akiusimasunit kisitat (2010-imi akit)
2021 0,7
2020 0,0
2019 2,6
2018 0,6
2017 0,0
2016 4,9
* Ineriartorneq procentinngorlugu (2010-mi akit, akiusimasunit kisitat)

Suliffillit


GS Innuttaasunut tamanut naleqqiullugu suliffillit annertussusaat
# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR30/ARXBFB05.px")

ARXBFB05_raw <-
  url |> 
  statgl_fetch(
    time                 = px_all(),
    municipality         = px_all(),
    "inventory variable" = "H",
    .col_code            = T
  ) |> 
  as_tibble()


# Transform
ARXBFB05 <- 
  ARXBFB05_raw %>% 
  mutate(time = time %>% make_date(),
         municipality = municipality %>% factor(levels = unique(municipality)))

# Plot
ARXBFB05 %>% 
  filter(municipality == ARXBFB05[[1]][1]) %>% 
  ggplot(aes(
    x     = time,
    y     = value,
    color = municipality
    )) +
  geom_line(size = 2) +
  facet_wrap(~ municipality, scales = "free") +
    scale_y_continuous(labels = scales::percent_format(
      scale      = 1, 
      accuracy   = 0.1, 
      big.mark   = ".",
      decimal.mark = ","
      )) +
  theme_statgl() + 
  scale_color_statgl() +
  theme(legend.position = "none") +
  labs(
    title    = sdg8$fig$fig2$title[language],
    subtitle = ARXBFB05[[1]][1],
    x        = " ",
    y        = " ",
    caption  = sdg8$fig$fig2$cap[language]
  )

Kisitsisaataasivik

Periaaseq


# Transform
ARXBFB05 <- 
  ARXBFB05_raw %>% 
  filter(
    municipality == ARXBFB05_raw[[1]][1],
    time         >= year(Sys.time()) - 7
    ) %>% 
  arrange(desc(time))

vec        <- 1:2
names(vec) <- c(" ", sdg8$fig$fig2$cols$col2[language])

# Table
ARXBFB05 %>% 
  select(2, ncol(.)) %>% 
  rename(vec) %>% 
  statgl_table() %>% 
  pack_rows(index = ARXBFB05[[3]] %>% table()) %>% 
  add_footnote(ARXBFB05[[1]][1], notation = "symbol")
Suliffillit annertussusaat
Agguaqatigiissillugu qaammammut suliffillit innuttaasut amerlassusaannut naleqqiullugit (pct.)
2022 66,9
2021 66,7
2020 66,0
2019 66,6
2018 66,1
2017 65,3
* Nuna tamakkerlugu (kommunit avataanni inissisimasut ilanngullugit)

Suliffissaaleqineq


FN 8.5.2 Ukiut malillugit suliffissaaleqinerup annertussusaa
# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR40/ARXLED3.px")

ARXLED3_raw <-
  url |> 
  statgl_fetch(
    time                 = px_all(),
    district             = "AA",
    age                  = "1",
    "inventory variable" = "P",
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
ARXLED3 <-
  ARXLED3_raw %>% 
  mutate(time = time %>% make_date()) %>% 
  unite(combi, 1, 2, 4, sep = ", ")

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = time,
    y     = value,
    color = combi
    )) +
  geom_line(size = 2) +
  theme_statgl() + 
  scale_color_statgl() +
  theme(legend.position = "none") +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 0.1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig3$title[language],
    subtitle = ARXLED3[[1]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig3$cap[language]
  )

Kisitsisaataasivik

Periaaseq


# Transform

ARXLED3 %>% 
  mutate(time = time %>% year()) %>% 
  filter(time > year(Sys.time()) - 8) %>% 
  spread(time, value) %>% 
  mutate(combi = sdg8$fig$fig3$cols$ncol[language][[1]]) %>% 
  rename(" " = 1) %>% 
  statgl_table()
2017 2018 2019 2020 2021 2022
Suliffissaaleqineq procentinngorlugu 5,9 5 4,3 4,5 3,7 3,2



# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR40/ARXLED3.px")

ARXLED4_raw <-
  url |> 
  statgl_fetch(
    time                 = px_all(),
    district             = "AA",
    "inventory variable" = "P",
    age                  = px_all(),
    .col_code            = T
    ) %>% 
  as_tibble()

# Transform
ARXLED4 <- 
  ARXLED4_raw %>% 
  filter(age != ARXLED4_raw[[2]][1]) %>% 
  arrange(desc(time)) %>% 
  mutate(age = age %>% factor(levels = unique(age)),
         time = time %>% make_date()) %>% 
  unite(combi, 1, 4, sep = ", ")

# Plot
ARXLED4 %>% 
  ggplot(aes(
    x     = time, 
    y     = value,
    color = age
    )) +
  geom_line(size = 1.5) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig4$title[language],
    subtitle = ARXLED4[[1]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig4$cap[language]
  )

Kisitsisaataasivik

Periaaseq


# Transform
ARXLED4 <- 
  ARXLED4_raw %>% 
  filter(
    age != ARXLED4_raw[[2]][1],
    time >= year(Sys.time()) - 6
    ) %>% 
  arrange(desc(time)) %>% 
  mutate(
    age = age %>% factor(levels = unique(age)),
    time = time %>% factor(levels = unique(time))
    ) %>% 
  unite(combi, 1, 2, sep = ", ") %>% 
  spread(3, ncol(.))

vec        <- ARXLED4[[2]] %>% length()
names(vec) <- sdg8$fig$fig4$index[language]


# Table
ARXLED4 %>% 
  select(-1) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = vec) %>% 
  pack_rows(index = table(ARXLED4$combi)) |> 
  add_footnote(ARXLED4_raw[[1]][1], notation = "symbol")
Agguaqatigiissillugu qaammammut suliffissaaleqineq pct.-inngorlugu
Suliffissaaleqineq procentinngorlugu
Nuna tamakkerlugu, 18-19-inik ukiullit
2022 5,0
2021 6,8
2020 8,5
2019 7,6
2018 12,2
Nuna tamakkerlugu, 20-24-nik ukiullit
2022 4,2
2021 4,8
2020 6,1
2019 6,2
2018 7,8
Nuna tamakkerlugu, 25-29-nik ukiullit
2022 3,1
2021 3,2
2020 4,5
2019 4,7
2018 5,3
Nuna tamakkerlugu, 30-34-nik ukiullit
2022 3,2
2021 3,3
2020 4,4
2019 4,0
2018 4,6
Nuna tamakkerlugu, 35-39-nik ukiullit
2022 2,8
2021 3,2
2020 4,2
2019 4,0
2018 4,6
Nuna tamakkerlugu, 40-44-nik ukiullit
2022 2,7
2021 3,4
2020 3,9
2019 3,7
2018 4,0
Nuna tamakkerlugu, 45-49-nik ukiullit
2022 2,4
2021 2,9
2020 3,9
2019 4,0
2018 4,3
Nuna tamakkerlugu, 50-54-inik ukiullit
2022 3,4
2021 4,0
2020 4,4
2019 3,9
2018 4,3
Nuna tamakkerlugu, 55-59-inik ukiullit
2022 3,2
2021 3,9
2020 4,3
2019 3,7
2018 4,3
Nuna tamakkerlugu, 60-inik ukiullit-soraarneruss. ukiussarititat
2022 3,5
2021 3,6
2020 4,2
2019 4,2
2018 4,6
* Nuna tamakkerlugu
GS Najugaq malillugu suliffissaaleqineq procentinngorlugu
# Import

url <- paste0("https://bank.stat.gl/api/v1/", language, "/Greenland/AR/AR40/ARXLED3.px")

ARXLED3_raw <-
  url |> 
  statgl_fetch(
    time                 = px_all(),
    district             = "AA",
    age                  = "1",
    "inventory variable" = "P",
    "place of residence" = px_all(),
    .col_code            = TRUE
    ) %>% 
  as_tibble()

# Transform
ARXLED3 <- 
  ARXLED3_raw %>% 
  mutate(time = time %>% make_date())

# Plot
ARXLED3 %>% 
  ggplot(aes(
    x     = time,
    y     = value, 
    color = `place of residence`
    )) +
  geom_line(size = 2) +
  theme_statgl() + 
  scale_color_statgl() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 1, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  labs(
    title    = sdg8$fig$fig5$title[language],
    subtitle = ARXLED4[[2]][1],
    x        = " ",
    y        = " ",
    color    = " ",
    caption  = sdg8$fig$fig5$cap[language]
    )

Kisitsisaataasivik

Periaaseq


# Transform
ARXLED3 <- 
  ARXLED3_raw %>% 
  filter(time >= year(Sys.time()) - 6) %>% 
  arrange(time) %>% 
  mutate(time = time %>% factor(levels = unique(time))) %>% 
  unite(combi, district, age, sep = ", ") %>% 
  spread(1, ncol(.))

vec        <- ARXLED3[[1]] %>% length()
names(vec) <- sdg8$fig$fig5$index[language]

# Table
ARXLED3 %>% 
  select(-c(1, 3)) %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  add_footnote(ARXLED3[[1]][1], notation = "symbol") %>% 
  row_spec(1, bold = TRUE) %>% 
  pack_rows(index = vec) |> 
  pack_rows(index = table(ARXLED3$`place of residence`))
Nuna tamakkerlugu, Katillugit
Suliffissaaleqineq procentinngorlugu
Illoqarfiit
2018 4,8
2019 4,1
2020 4,3
2021 3,4
2022 3,0
Katillugit
2018 5,0
2019 4,3
2020 4,5
2021 3,7
2022 3,2
Nunaqarfiit il.il.
2018 6,9
2019 6,1
2020 6,5
2021 5,3
2022 4,9
* Illoqarfiit



Ilisimatusarneq ineriartortitsinerlu


GS Ilisimatusarnermut ineriartortitsinermullu aningaasartuutit BNP-mi annertussusaat
# Import
NRX09_raw <-
  statgl_url("NRX09", lang = language) %>%
  statgl_fetch(
    "units"   = "L",
    "account" = px_all(),
    "time"    = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

NRX09_raw <- NRX09_raw %>% filter(account %in% unique(NRX09_raw %>% pull(account))[7])

NRX10_raw <-
  statgl_url("NRX10", lang = language) %>% 
  statgl_fetch(
    "units"    = "L",
    "account"  = "01",
    "Aar"      = px_all(),
    .col_code = TRUE
    ) %>% 
  as_tibble()

# Transform
RD_GDP <- 
  NRX10_raw %>% 
  select(3:4) %>% 
  rename(
    "time" = 1,
    "GDP"  = 2
    ) %>% 
  left_join(
    NRX09_raw %>% 
      mutate(account = account %>% str_remove_all("[:digit:]") %>% trimws()) %>% 
      select(3:4) %>% 
      rename("RD" = 2)
    ) %>% 
  mutate(pct = RD / GDP) %>% 
  filter(pct != "NA")

# Plot
RD_GDP %>% 
  ggplot(aes(
    x    = time,
    y    = pct,
    fill = time
    )) +
  geom_col() +
  scale_y_continuous(labels  = scales::percent_format(
    scale        = 100, 
    accuracy     = 1, 
    big.mark     = ".",
    decimal.mark = ","
    )) +
  theme_statgl() + 
  scale_fill_statgl() +
  theme(legend.position = "none") +
  labs(
    title    = sdg8$fig$fig6$title[language],
    subtitle = NRX09_raw[[1]][1],
    x        = " ",
    y        = sdg8$fig$fig6$y_lab[language],
    caption  = sdg8$fig$fig6$cap[language]
  )

Kisitsisaataasivik, aningaasaliinerit (ilisimatusarneq ineriartortitsinerlu)

Kisitsisaataasivik, BNP


# Transform
tab <- 
  RD_GDP %>% 
  #arrange(desc(time)) %>% 
  filter(time >= year(Sys.time()) - 7) %>% 
  mutate(
    time = time %>% fct_inorder(),
    pct  = pct * 100,
    pct  = pct %>% round(1),
    var  = sdg8$fig$fig6$cols$col1[language]
    ) %>% 
  select(-(2:3)) %>% 
  spread(1, 2)

# Table
tab %>% 
  rename(" " = 1) %>% 
  statgl_table() %>% 
  pack_rows(index = table(NRX09_raw[[1]][1])) %>% 
  add_footnote(sdg8$fig$fig6$foot[language], notation = "symbol")
2017 2018 2019 2020 2021
Akit ingerlaavartut, mio. kr.
Ilisimatusarnermut ineriartortitsinermullu aningaasartuutit 2,1 1,8 1,8 1,6 1,6
* BNP-mi procentinngorlugu

Nunanut allanut angalasut


GS Timmisartumik ilaasartaammik nunanut allanut angalasut amerlassusaat
# Import
TUXUPAX_raw <-
  statgl_url("TUXUPAX", lang = language) %>%
  statgl_fetch(airport   = 0,
               month     = 0,
               time      = px_all(),
               .col_code = TRUE) %>% 
  as_tibble()

# Transform
TUXUPAX <-
  TUXUPAX_raw %>% 
  mutate(value = value / 1000,
         time = time %>% make_date())

# Plot
TUXUPAX %>% 
  ggplot(aes(
    x    = time,
    y    = value, 
    fill = airport
    )) +
  geom_col() +
  theme_statgl() + 
  scale_fill_statgl() +
  theme(plot.margin = margin(10, 10, 10, 10),
        legend.position = "none") +
  labs(
    title = sdg8$fig$fig7$title[language],
    x = " ",
    y = sdg8$fig$fig7$y_lab[language],
    caption = sdg8$fig$fig7$cap[language]
  )

Kisitsisaataasivik

Periaaseq


# Transform
TUXUPAX <-
  TUXUPAX_raw %>% 
  mutate(value = value) %>% 
  filter(time >= year(Sys.time()) - 7,
         value != "NA") %>% 
  arrange(desc(time))

vec <- 1:2
names(vec) <- c(" ",  sdg8$fig$fig7$cols$col2[language])


# Table
TUXUPAX %>% 
  select(-(1:2)) %>% 
  rename(vec) %>% 
  statgl_table() %>% 
  add_footnote(sdg8$fig$fig7$foot[language],
               notation = "symbol")
Timmisartumik ilaasartaammik nunanut allanut angalasut
2023 96.362
2022 85.484
2021 39.293
2020 30.785
2019 86.989
2018 85.306
2017 83.487
* Ilaasut tuusintilikkuutaarlugit.

Inuusuttut sullinniakkat


GS Inuusuttut sullinniakkat
UDXUMG3_raw <- 
  statgl_url("UDXUMG3", lang = language) %>%
  statgl_fetch(
    alder        = px_all(),
    registrering = 5:7,
    aar          = px_all(),
    .col_code    = TRUE
  ) %>% 
  as_tibble()

#sdg8 <- read_yaml("S:/STATGS/VM/SDG_dokument/input/text/txt_08.yml")

lab_vec        <- 1:5
names(lab_vec) <- 
  c(
    "age",
    "time",
    sdg8$fig$fig8$tags$tag1[language] %>% unlist(),
    sdg8$fig$fig8$tags$tag2[language] %>% unlist(),
    sdg8$fig$fig8$tags$tag3[language] %>% unlist()
)


UDXUMG3 <-
  UDXUMG3_raw %>% 
  rename("status" = registrering, "age" = alder, "time" = aar) |> 
  mutate(status = status %>% fct_inorder()) %>% 
  spread(status, value) %>% 
  rename(
    "age"   = 1,
    "time"  = 2,
    "work"  = 3,
    "none"  = 4,
    "total" = 5
  ) %>% 
  mutate(edu = total - work - none) %>% 
  select(-total) %>% 
  rename(lab_vec) %>% 
  gather(status, value, -c(age, time)) %>% 
  mutate(time = time %>% as.numeric()) %>% 
  filter(time %in% c(min(time), mean(time), max(time))) %>%
  mutate(time = time %>% as.character() %>% fct_rev())
  

UDXUMG3 %>%
  ggplot(aes(
    x    = parse_number(age),
    y    = value,
    fill = status
  )) +
  geom_col(position = "fill") +
  facet_wrap(~ time) + 
  scale_x_continuous(labels = function(x) round(x)) +
  scale_y_continuous(labels = scales:: percent) + 
  scale_fill_statgl(reverse = TRUE) +
  theme_statgl() + 
  labs(
    title    = sdg8$fig$fig8$title[language],
    subtitle = sdg8$fig$fig8$sub[language],
    x        = sdg8$fig$fig8$x_lab[language],
    y        = " ",
    color    = colnames(UDXUMG3_raw)[2] %>% str_to_title(),
    caption  = sdg8$fig$fig8$cap[language]
)

Kisitsisaataasivik

Periaaseq


tab <- 
  UDXUMG3 %>% 
  mutate(age = age %>% fct_inorder()) %>% 
  arrange(age, time, status) %>% 
  unite(combi, time, status, sep = ",") %>% 
  mutate(combi = combi %>% fct_inorder()) %>% 
  spread(combi, value)

vec      <- tab %>% select(-1) %>% colnames() %>% str_split(",") %>% unlist()
head_vec <- vec[c(TRUE, FALSE)] %>% table() %>% rev()
col_vec  <- vec[c(FALSE, TRUE)]

tab %>% 
  statgl_table(col.names = c(" ", col_vec)) %>% 
  add_header_above(c(" ", head_vec)) %>% 
  add_footnote(sdg8$fig$fig8$foot[language], notation = "symbol")
2022
2019
2016
age 2022,Ilinniakkamik ingerlatsisut 2022,Suliffeqanngitsut ilinnianngitsullu 2022,Suliffillit 2019,Ilinniakkamik ingerlatsisut 2019,Suliffeqanngitsut ilinnianngitsullu 2019,Suliffillit 2016,Ilinniakkamik ingerlatsisut 2016,Suliffeqanngitsut ilinnianngitsullu 2016,Suliffillit
16-inik ukiullit 347 292 68 314 317 84 390 295 70
17-inik ukiullit 299 325 136 290 358 141 275 362 127
18-inik ukiullit 303 260 174 278 271 220 298 325 176
19-inik ukiullit 238 218 266 230 205 288 274 318 300
20-nik ukiullit 167 221 388 150 221 372 171 264 374
21-nik ukiullit 176 215 360 159 225 397 205 242 389
22-nik ukiullit 149 177 363 174 236 462 219 233 411
23-nik ukiullit 161 198 390 169 189 452 223 221 472
24-nik ukiullit 187 199 404 195 181 482 227 197 476
25-nik ukiullit 158 199 519 194 173 496 230 186 487
* Inuit amerlassusaat